package effect;

import card.CreatureCard;
import core.MapUtil;

/**
 * 
 * @author Oscar
 * Adds 1 to defense. Creatures get this effect when they stand on the same tile as a wall.
 */
public class ProtectingWall extends Effect {
	public ProtectingWall(){
		name="Wall";
		description="Adds 1 defense to all the creatures in this tile";
		imageName="barbarianIconSmallTemp.png";
		effectTypes.add(EffectType.auraTile);
		isVisible = false;
	}
	
	@Override
	public void triggerAuraTile(){
		for(CreatureCard c : MapUtil.getTileOfCard(EffectUtil.getCard(this)).getCreatures())
			c.addEffect(EffectGenerator.generateEffect("ProtectedByWall"));
	}
}